Page({
  data: {
      titleType: 0,
      phoneResult: {
          phone: "",
          shang: "",
          type: "",
          provice: "",
          city: ""
      },
      IDcardResult: {
          id: "",
          provice: "",
          city: "",
          xian: "",
          Birdate: "",
          sex: ""
      },
      backCardResult: {
          id: "",
          icon: "",
          name: "",
          cardType: "",
          phone: "",
          provice: "",
          city: ""
      },
      ipResult: {
          ip: "",
          provice: "",
          shang: ""
      },
      nowPage: "",
      noData: !1
  },
  onLoad: function(t) {
      var e = this;
      e.getOpenerEventChannel().on("data", function(t) {
          if (console.log(t), e.setData({
              nowPage: t.ocr_type
          }), 1 == t.ocr_type) if ("" == t.data) e.setData({
              noData: !0
          }); else {
              var a = t.data.showapi_res_body, o = "";
              o = 1 == a.type ? "移动" : 2 == a.type ? "电信" : 3 == a.type ? "联通" : "未知", e.setData({
                  phoneResult: {
                      phone: t.phoneNum,
                      shang: o,
                      type: a.name,
                      provice: a.prov,
                      city: a.city
                  },
                  titleType: t.ocr_type
              });
          } else 2 == t.ocr_type ? e.setData({
              IDcardResult: {
                  id: t.idNum,
                  provice: t.data.province,
                  city: t.data.city,
                  xian: t.data.town,
                  Birdate: t.data.birth,
                  sex: t.data.sex
              },
              titleType: t.ocr_type
          }) : 3 == t.ocr_type ? (console.log(t), console.log(t.data), e.setData({
              backCardResult: {
                  id: t.backNum,
                  icon: t.data.logo,
                  name: t.data.bank,
                  cardType: t.data.type,
                  phone: t.data.tel,
                  provice: t.data.province,
                  city: t.data.city
              },
              titleType: t.ocr_type
          })) : 4 == t.ocr_type && (console.log(t), e.setData({
              ipResult: {
                  ip: t.ip,
                  provice: t.data.area,
                  shang: t.data.type
              },
              titleType: t.ocr_type
          }));
      });
  },
  continiuSelect: function(t) {
      var e = t.currentTarget.dataset.id, a = getCurrentPages();
      a[a.length - 1].setData({
          ocr_type: e
      }), wx.navigateBack({
          delta: 1
      });
  },
  onReady: function() {},
  onShow: function() {},
  onHide: function() {},
  onUnload: function() {},
  onPullDownRefresh: function() {},
  onReachBottom: function() {},
  onShareAppMessage: function() {}
});